<form id="edit-form" class="form-horizontal col-sm-12" role="form" data-toggle="validator" method="POST" action="">
<div class="panel panel-default panel-intro">
    <div>
        <div class="tab-content">
            <div role="tabpanel" >
                <input type="hidden" id="id" name="row[id]" value="{$id}"/>
                <div class="form-group">
                    <div class="alert alert-warning-light no-margin">
                        负责人
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-xs-6 col-sm-5">
                        <div class="form-group col-sm-10">
                            <span class="text-muted" style="float: left;">员工:</span>
                            <b style="float: left;width: 150px;margin-left: 5px;">
                                <select name="row[staff][0][id]" id="c-staff_id" class="form-control selectpicker" data-live-search="true">
                                    <option value="">请选择</option>
                                    {foreach name="staffs" item="val"}
                                    <option value="{$val.id}" {eq name="val.id" value="$principal.staff.id" }selected{/eq} >{$val.name}</option>
                                    {/foreach}
                                </select>
                                <input type="hidden" name="row[staff][0][is_edit]" value="1"/>
                                <input type="hidden" name="row[staff][0][roles]" value="1"/>
                            </b>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-xs-12 col-sm-12" style="padding-left:0 !important;padding-right:0 !important;margin-bottom: 20px;">
                        <div class="alert alert-warning-light no-margin col-sm-12">
                            <span>团队成员</span>
                            <span style="float: right"><a class="btn btn-xs btn-info btn-add_team" style="color: #fff;text-decoration:none">添加成员</a></span>
                        </div>
                    </div>

                </div>
                <div role="tabpanel" class="tab-pane  panel-body" id="team">
                    <table id="table-team" class="table table-striped table-bordered table-hover table-nowrap"
                           width="100%">
                        <tr>
                            <td class="text-center">员工姓名</td>
                            <td class="text-center">员工角色</td>
                            <td class="text-center">权限</td>
                            <td class="text-center">操作</td>
                        </tr>
                        {foreach name="list" item="val"}
                        <tr>
                            <input type="hidden" name="row[staff][{$key+1}][id]" value="{$val.staff.id}"/>
                            <input type="hidden" name="row[staff][{$key+1}][is_edit]" class="staff_is_edit" value="{$val.is_edit}"/>
                            <input type="hidden" name="row[staff][{$key+1}][roles]" value="2"/>
                            <td class="text-center">{$val.staff.name}</td>
                            <td class="text-center">{$val.staff.post}</td>
                            <td class="text-center is_edit">{if $val.is_edit == 1}读写{else}只读{/if}</td>
                            <td class="text-center">
                                {if $val.is_edit == 1}
                                <a class="btn btn-xs btn-info btn-duxie">读写</a>
                                <a class="btn btn-xs btn-info btn-zhidu" style="display: none">只读</a>
                                {else}
                                <a class="btn btn-xs btn-info btn-duxie" style="display: none">读写</a>
                                <a class="btn btn-xs btn-info btn-zhidu">只读</a>
                                {/if}
                                <a href="javascript:;" class="btn btn-xs btn-danger btn-delone"   data-original-title="删除"><i class="fa fa-trash"></i></a>
                            </td>
                        </tr>
                        {/foreach}
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="form-group layer-footer">
    <label class="control-label col-xs-12 col-sm-2"></label>
    <div class="col-xs-12 col-sm-8">
        <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
    </div>
</div>
</form>